import React from 'react'
import { Route } from 'react-router-dom'

export default function RootView({ routes }) {
    return (
        <>
            {
               routes.map((item, index) => {
                   return <Route 
                            path = { item.path } 
                            render = {() => {
                                const Com = item.component
                                return <Com/>
                            }}
                            key = { index }/>
               }) 
            }
        </>
    )
}
